
import { defineStore } from 'pinia'
import { useSessionStorage } from '@vueuse/core';
import type { PagePermType } from '@/compostions/pagePerm';


// 页面缓存
export const useCommonStore = defineStore('commonStore', () => {
  const sysPages = useSessionStorage<PagePermType[]>("th-front-sys-pages", [])

  function setSysPages(pages: PagePermType[]) {
    sysPages.value = pages
  }

  return {
    sysPages,
    setSysPages
  }
})
